{extend name="layout/common_layout" /}
{block name="body"}
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">充值订单管理</li>
        </ul>
        <div class="layui-tab-content">
            <form class="layui-form layui-form-pane" action="{:url('admin/Order/index')}" method="get">
                <div class="layui-inline">
                    <label class="layui-form-label">订单编号</label>
                    <div class="layui-input-inline">
                        <input type="text" name="o_order_num" value="{$o_order_num}" placeholder="请输入订单编号" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">用户名</label>
                    <div class="layui-input-inline">
                        <input type="text" name="u_email" value="{$u_email}" placeholder="请输入用户邮箱" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <button class="layui-btn">搜索</button>
                </div>
            </form>
            <hr>
            <form action="" method="post" class="ajax-form">
                <div class="layui-tab-item layui-show">
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th style="width: 30px;">ID</th>
                            <th>用户</th>
                            <th>订单号</th>
                            <th>充值类型</th>
                            <th>金额（人民币）</th>
                            <th>金额（美金）</th>
                            <th>状态</th>
                            <th>下单时间</th>
                            <th>支付时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name="list" item="vo"}
                        <tr>
                            <td>{$vo.o_id}</td>
                            <td>{$vo.u_email}</td>
                            <td>{$vo.o_order_num}</td>
                            <td>{php}echo $vo['o_type']==1 ? '微信' : '支付宝';{/php}</td>
                            <td>{$vo.o_money_rmb}</td>
                            <td>{$vo.o_money_dollar}</td>
                            {if condition="$vo.o_status == 1"}
                                <td style="color: red;">待确认</td>
                            {/if}
                            {if condition="$vo.o_status == 2"}
                                <td style="color: green;">确认到账</td>
                            {/if}
                            {if condition="$vo.o_status == 3"}
                                <td style="color: green;">未到账已拒绝</td>
                            {/if}
                            <td>{$vo.o_create_time}</td>
                            <td>{$vo.o_update_time}</td>
                            <td>
                                <a href="{:url('admin/Order/detail',['id'=>$vo['o_id']])}" class="layui-btn layui-btn-normal layui-btn-mini">查看详情</a>
                                {if condition="$vo['o_status'] eq 1"}
                                    <a href="{:url('admin/order/update',['o_id'=>$vo['o_id'],'o_uid'=>$vo['o_uid'],'o_money_dollar'=>$vo['o_money_dollar'],'o_status' => 2])}" class="layui-btn layui-btn-normal layui-btn-mini ajax-confim">确认到账</a>
                                    <a href="{:url('admin/order/update',['o_id'=>$vo['o_id'],'o_uid'=>$vo['o_uid'],'o_money_dollar'=>$vo['o_money_dollar'],'o_status' => 3])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-confim">拒绝到账</a>
                                {/if}
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                    <!--分页-->

                    {if condition="$list != null"}
                    {$list->render()}
                    {/if}
                </div>
            </form>
        </div>
    </div>
{/block}


{block name="script"}

<script>



</script>


{/block}
